export default {
  // **************************领导端**************************
  // 查询对话用户列表
  getLeaderUsers: (data) => uni.$axios('get', '/community/message/leader/conversation/users', data),
  /**
   * 查询与指定用户的对话记录
   * @param {*} data.userId 用户id
   * @returns 
   */
  getLeaderHistory: (data) => uni.$axios('get', '/community/message/leader/conversation/detail', data),
  /**
   * 发送消息给用户
   * @param {*} data.leaderUserId 领导id 
   * @param {*} data.userId 用户id 
   * @param {*} data.content 内容
   */
  sendLeader: (data) => uni.$axios('post', '/community/message/leader/send', data),

  // **************************用户端**************************
  // 查询对话领导列表
  getUserLeaders: (data) => uni.$axios('get', '/community/message/user/conversation/leaders', data),
  /**
   * 查询与指定领导的对话记录
   * @param {*} data.leaderUserId 领导id
   * @returns 
   */
  getUserHistory: (data) => uni.$axios('get', '/community/message/user/conversation/detail', data),
  /**
   * 发送消息给领导
   * @param {*} data.leaderUserId 领导id 
   * @param {*} data.userId 用户id 
   * @param {*} data.content 内容
   */
  sendUser: (data) => uni.$axios('post', '/community/message/user/send', data),
}